import * as TYPE from './../action-types'

let stateDefault = {
    projectList:[],
    showDetail: false
};

/*
 *
 */
export default function projectManager(state=stateDefault, action) {
    state = JSON.parse(JSON.stringify(state));

    switch(action.type) {

        case TYPE.FETCH_PAGE_PROJECT:
            state.projectList= action.result.data.data
            break;

        case TYPE.SHOW_PROJECT_DETAIL:
            state.showDetail = action.result.data
            break;

    }

    return state
}
